#include <iostream>
#include <unistd.h>
#include <signal.h>


volatile int flag = 0;
void myhandler(int x)
{
    flag = 1;
}
int main()
{
    signal(SIGINT,myhandler);
    while(!flag);
    std::cout << flag << std::endl;
    std::cout << "haha,never come here" << std::endl;
    return 0;
}